#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e6 + 10;
int heap[N];
int n;
void up(int child)
{
	int parent = child / 2;
	while (parent >= 1 && heap[child] > heap[parent])
	{
		swap(heap[parent], heap[child]);
		child = parent;
		parent = child / 2;
	}
}
void down(int parent)
{
	int child = parent * 2;
	while (child <= n)
	{
		if (child + 1 <= n && heap[child] < heap[child + 1]) child++;
		if (heap[parent] > heap[child]) return;
		swap(heap[parent], heap[child]);
		parent = child;
		child = parent * 2;
	}
}
void push(int x)
{
	heap[++n] = x;
	up(x);
}
int main()
{

	return 0;
}